﻿using System;
using System.Drawing;

namespace MarioMapEditor
{
    class ObCoin : ObObject
    {
        public enum COIN
        {
            SCORECOIN = 140
        };

        public ObCoin()
        {
            ID = (int)COIN.SCORECOIN;
            Width = 1;
            Height = 1;
        }

        public override bool SetID(int nID)
        {
            if (checkType(nID))
            {
                ID = nID;
                return true;
            }
            return false;
        }

        public static bool checkType(int objectID)
        {
            return Enum.IsDefined(typeof(COIN), objectID);
        }

        public override Bitmap GetBitmap()
        {
            if (!checkType(ID))
            {
                return null;
            }

            return Properties.Resources.Coin;
        }
    }

}
